home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / misc / apollo / DM Keys Under X < prev    next >
Encoding:
Internet Message Format  |  1992-10-18  |  4.3 KB

  1. Path: usage.csd.unsw.oz.au!metro!munnari.oz.au!samsung!umich!terminator!dabo.citi.umich.edu!rees
  2. From: rees@dabo.citi.umich.edu (Jim Rees)
  3. Newsgroups: comp.sys.apollo
  4. Subject: Re: twm & apollo keys
  5. Message-ID: <510739db.cb12@dabo.citi.umich.edu>
  6. Date: 17 Apr 91 14:37:10 GMT
  7. References: <9104171236.AA00634@cml.unl.edu>
  8. Sender: usenet@terminator.cc.umich.edu (usenet news)
  9. Reply-To: rees@citi.umich.edu (Jim Rees)
  10. Organization: University of Michigan ITD
  11. Lines: 104
  12.  
  13. In article <9104171236.AA00634@cml.unl.edu>, gah@CML.UNL.EDU (Glen A. Hansen) writes:
  14.  
  15.     1) Has anyone had any success defining the Apollo DM keys (Pop,
  16.        Again, Cut, etc.) to operate in twm, and/or in an xterm?
  17.  
  18. I've had some limited success at this.  Here are two entries from the FAQ
  19. file (available by ftp from dabo.citi.umich.edu) about X keys.
  20.  
  21. Question:
  22.  
  23. Are the VT100 PF1-PF4 keys defined in the Apollo version of xterm?  If so,
  24. where are they?  If not, can someone give me a hint how to define them (or
  25. how to redefine any key for that matter).
  26.  
  27.  -- John A. Breen
  28.  
  29. Answer:
  30.  
  31. The manual "Using the X Window System on Apollo Workstations" is the place
  32. to look for some of this -- it's a good summary, but not an exhaustive
  33. treatise on X.  The answer to your question is that you will need to use the
  34. client "xmodmap" in order to simulate the keys which are not physically
  35. present on the Apollo keyboard (PF1-PF4 as an example).
  36.  
  37. Since you are running in a "dm owns root" configuration, you'll need to take
  38. into account the "keyboard.config" file which tells XApollo "this list of
  39. keys doesn't exist for X, pass them through to the Apollo Display Manager".
  40. This is important because you don't want to remap keys for xterm which
  41. XApollo will not GIVE to xterm. See section 2.2.2 in the manual for a
  42. detailed discussion about the /usr/lib/X11/keyboard/keyboard.config file.
  43.  
  44. Once you have picked a set of physical keys to emulate the PF keys, feed
  45. this to xmodmap using the physical keycode and the keysym name (from the
  46. include file /usr/include/X11/keysymdef.h).
  47.  
  48. Example - you want to make the "AGAIN" key map to PF1.  Looking at the
  49. output of "xmodmap -pk" you see that it is labeled "Redo" (which agrees with
  50. the entry in the keyboard.config file), and it is keycode value 158.
  51. Looking at the include file keysymdef.h, you see "#define XK_KP_F1 0xFF91"
  52. which is the entry for "keypad function key 1" - also known as PF1.  The
  53. xmodmap client will take either a file entry or a command line remapping, so
  54. you could invoke it as < xmodmap -e "keycode 158 = KP_F1" > (the quotes are
  55. required on the command line) and the deed is done.
  56.  
  57. If you don't have a copy of the manual, you can get one by using the order
  58. number "015213-A02". Hope that helps.
  59.  
  60.  -- weber_w@apollo.HP.COM (Walt Weber)
  61.  
  62.  
  63. Question:  What else should I know about X keysyms?
  64.  
  65. Answer:
  66.  
  67. I suggest you put the following into /usr/X11/lib/XKeysymDB :
  68.  
  69. LineDel:        1000FF00
  70. CharDel:        1000FF01
  71. Copy:           1000FF02
  72. Cut:            1000FF03
  73. Paste:          1000FF04
  74. Move:           1000FF05
  75. Grow:           1000FF06
  76. Cmd:            1000FF07
  77. Shell:          1000FF08
  78. LeftBar:        1000FF09
  79. RightBar:       1000FF0A
  80. LeftBox:        1000FF0B
  81. RightBox:       1000FF0C
  82. UpBox:          1000FF0D
  83. DownBox:        1000FF0E
  84. Pop:            1000FF0F
  85. Read:           1000FF10
  86. Edit:           1000FF11
  87. Save:           1000FF12
  88. Exit:           1000FF13
  89. Repeat:         1000FF14
  90. KP_parenleft:   1000FFA8
  91. KP_parenright:  1000FFA9
  92.  
  93. This will let you refer to these keys by name.  For example, the following
  94. resource will define scroll keys for your xterm.  You can put this resource
  95. into your ~/.Xdefaults file and it will get loaded when you start an xterm.
  96.  
  97. XTerm*VT100.Translations: #override \
  98.     <KeyPress>UpBox       : scroll-back(1,halfpage) \n \
  99.     <KeyPress>DownBox     : scroll-forw(1,halfpage) \n
  100.  
  101. If you use emacs or motif, you may want to define a "meta" key (motif calls
  102. this an "alt" key, presumably because IBM has some pull at OSF).  You can do
  103. this by creating a ~/.keymod file, an put this in it:
  104.  
  105.   clear mod1
  106.   keycode 147 = Meta_L
  107.   add mod1 = Meta_L
  108.  
  109. This makes F0 your meta key.  You can use whatever key you want as your
  110. meta, of course.  Use xev to find out the keycode for the key you want.
  111. Then, when you log in, run this command (I put this in ~/.xsession, which
  112. gets run on my machine when I log in):
  113.  
  114.   /usr/bin/X11/xmodmap .keymod
  115.  
  116.  -- Jim Rees
  117.